package main.controller;

import java.util.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.*;
import org.springframework.http.*;
import org.springframework.data.domain.*;
import org.springframework.web.bind.annotation.*;

import com.justep.cloud.microservice.http.*;
import com.justep.cloud.microservice.*;


import main.service.X5TianjiadqyhfjxxService;


@RestController
public class TianjiadqyhfjxxController extends MicroServiceBaseController {
	private static final Logger logger = LoggerFactory.getLogger(TianjiadqyhfjxxController.class);
	static Map<String, Map<String, Integer>> exceptionStatusMap = new HashMap<String, Map<String, Integer>>();
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("jiarugwj", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("zhucexx", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("fasongltnr", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("chuangjiandd", map);
	}		
	static {
		Map<String, Integer> map = new HashMap<String, Integer>();
		exceptionStatusMap.put("zhuceyhltlb", map);
	}		
	@Autowired
	@Qualifier("x5TianjiadqyhfjxxService")
	private X5TianjiadqyhfjxxService service;

	//系统生成代码,请不要修改或删除 <actionStart:jiarugwj>
@RequestMapping(value = "/main/tianjiadqyhfjxx/jiarugwj", method = RequestMethod.GET)
	public ResponseEntity<String> jiarugwj(


@RequestHeader(name = "X-Credential-User-Id" ) String sys_XCredentialUserId,
			@RequestParam(name = "spID" ) String spID,
			@RequestParam(name = "num" , defaultValue = "1") Integer num,
			@RequestParam(name = "select" , defaultValue = "0") Integer select
) throws Exception {
		try {
String resp = service.jiarugwj(sys_XCredentialUserId,spID,num,select);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("jiarugwj");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:jiarugwj>
	//系统生成代码,请不要修改或删除 <actionStart:zhucexx>
@RequestMapping(value = "/main/tianjiadqyhfjxx/zhucexx", method = RequestMethod.GET)
	public ResponseEntity<String> zhucexx(


@RequestHeader(name = "X-Credential-User-Id" ) String sys_XCredentialUserId
) throws Exception {
		try {
String resp = service.zhucexx(sys_XCredentialUserId);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("zhucexx");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:zhucexx>
	//系统生成代码,请不要修改或删除 <actionStart:fasongltnr>
@RequestMapping(value = "/main/tianjiadqyhfjxx/fasongltnr", method = RequestMethod.GET)
	public ResponseEntity<String> fasongltnr(


@RequestParam(name = "tableID" ) String tableID,
			@RequestParam(name = "content" ) String content,
			@RequestHeader(name = "X-Credential-User-Id" ) String sys_XCredentialUserId
) throws Exception {
		try {
String resp = service.fasongltnr(tableID,content,sys_XCredentialUserId);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("fasongltnr");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:fasongltnr>
	//系统生成代码,请不要修改或删除 <actionStart:chuangjiandd>
@RequestMapping(value = "/main/tianjiadqyhfjxx/chuangjiandd", method = RequestMethod.GET)
	public ResponseEntity<String> chuangjiandd(


@RequestParam(name = "spID" ) String spID,
			@RequestParam(name = "buyerSaying" ) String buyerSaying,
			@RequestHeader(name = "X-Credential-User-Id" ) String sys_XCredentialUserId
) throws Exception {
		try {
String resp = service.chuangjiandd(spID,buyerSaying,sys_XCredentialUserId);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("chuangjiandd");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:chuangjiandd>
	//系统生成代码,请不要修改或删除 <actionStart:zhuceyhltlb>
@RequestMapping(value = "/main/tianjiadqyhfjxx/zhuceyhltlb", method = RequestMethod.GET)
	public ResponseEntity<String> zhuceyhltlb(


@RequestHeader(name = "X-Credential-User-Id" ) String sys_XCredentialUserId,
			@RequestParam(name = "user2ID" ) String user2ID
) throws Exception {
		try {
String resp = service.zhuceyhltlb(sys_XCredentialUserId,user2ID);
HttpHeaders headers = new HttpHeaders();
headers.putAll(getSystemHeader());
processContentType(headers);
ResponseEntity<String> ret = new ResponseEntity<String>(resp,headers,HttpStatus.OK);
return ret;
		} catch (ActionException ex) {
			ex.setActionName("zhuceyhltlb");
			throw ex;
		}
	}
	//系统生成代码,请不要修改或删除 <actionEnd:zhuceyhltlb>
	@Override
	protected Map<String, Map<String, Integer>> getExceptionStatusMap() {
		return exceptionStatusMap;
	}
}
